import ajax from '@/utils/ajax'

/**
 * @module 营销中心接口
 */

// 周边司机列表
export const aroundDriverList = params => ajax.post('/callDriver/nearbyDriverList', params)

// 流失司机列表
export const lostDriverList = params => ajax.post('/callDriver/lossDriverList', params)

// 获取用户名下所有油站
export const getAllGasInfoList = params => ajax.post('gasInfo/getAllGasInfoList', params)

// 创建召唤周边司机列表
export const createAroundDriver = params => ajax.post('/callDriver/createNearbyActive', params)

// 创建召唤流失司机列表
export const createLostDriver = params => ajax.post('/callDriver/createLossActive', params)

// 是否可以创建活动
export const isCreateActive = params => ajax.post('/callDriver/canCreateActive', params)

// 活动相关的下拉框列表
export const activeSelect = params => ajax.post('/callDriver/activeSelectList', params)

// 常用油号下拉框列表
export const activeOilSelect = params => ajax.post('/callDriver/queryOilNum', params)

// 优惠券-列表
export const couponList = params => ajax.post('/couponRule/queryCouponRuleList', params)

// 优惠券-新增优惠券
export const addCoupon = params => ajax.post('/couponRule/saveGasCouponRule', params)

// 优惠券-查询接口
export const checkCoupon = params => ajax.post('/couponRule/couponRuleDetail', params)

// 优惠券-启用，禁用，删除接口
export const useOrDelete = params => ajax.post('/couponRule/operateCouponRule', params)

// 优惠券-校验油站优惠券未删除个数
export const conponCheckNum = params => ajax.post('/couponRule/judgeGasCouponRuleCount', params)

// 优惠券-查询某油站可用油品接口
export const searchGas = params => ajax.post('/couponRule/queryGasOilNum', params)

// 优惠券-查询优惠券面额范围和使用门槛范围(校验）
export const checkDoor = params => ajax.post('/couponRule/queryCouponRuleNotice', params)

// 营销活动-活动列表接口
export const activeList = params => ajax.post('/activity/queryActivityList', params)

// 营销活动-活动详情接口
export const activeDetail = params => ajax.post('/activity/activityDetail', params)

// 营销活动-活动详情接口里面的查看接口
export const activeDetailCheck = params => ajax.post('/activity/queryActivityCouponRuleList', params)

// 营销活动-营销类型，活动状态下拉列表接口
export const activitySelect = params => ajax.post('/activity/activityDownSelect', params)

// 营销活动-活动效果接口
export const activityDetail = params => ajax.post('/activity/activityDetail', params)

// 营销活动-活动效果接口
export const activeDataTrend = params => ajax.post('/orderDayReport/activeDataTrend', params)

// 发送验证码
export const sendVerification = params => ajax.post('/login/sendVerification', params)

// 召唤周边司机联动油型号
export const aroundOilNum = params => ajax.post('/callDriver/oilNumWithNever', params)

// 召唤流失司机联动油型号
export const lostOilNum = params => ajax.post('/callDriver/oilNumWithAll', params)

// 介绍中心
export const introduce = params => ajax.post('/case/queryCase', params)

// 短信剩余条数
export const texHas = params => ajax.post('/storeCoupon/queryPushAndSmsInterest', params)

// 能+商城 下单购买套餐包
export const bookPackage = params => ajax.post('/package/bookPackage', params)

// 能+商城 套餐包下单支付
export const pay = params => ajax.post('/package/pay', params)

// 能+商城 套餐包订单状态轮循
export const pollingPayStatus = params => ajax.post('/package/pollingPayStatus', params)

// 能+商城 获取协议内容
export const getPackageAgreement = params => ajax.post('/package/getPackageAgreement', params)

// 能+商城 线下汇款信息获取
export const getBankAccount = params => ajax.post('/package/getBankAccount', params)

// 请选择套餐包
export const queryAvailablePackages = params => ajax.post('/package/queryAvailablePackages', params)

// 商户营销权益预览
export const rightsPreview = params => ajax.post('/package/rightsPreview', params)

// 我的订单列表
export const getPackageOrderList = params => ajax.post('/package/getPackageOrderList', params)

// 取消订单
export const cancelOrder = params => ajax.post('/package/cancelOrder', params)

// 支付校验接口
export const checkOrder = params => ajax.post('/package/checkOrder', params)

// 根据订单号获取订单详情
export const getOrderInfo = params => ajax.post('/package/getOrderInfo', params)

// 轮播图
export const lunbo = params => ajax.post('/services/case/queryCase', params)

// 获取优惠券模板
export const getCouponTemplate = params => ajax.post('/storeCoupon/couponTemplate', params)

// 获取店铺券活动
export const getStoreCouponActiveDetail = params => ajax.post('/storeCoupon/queryStoreCouponActive', params)

// 新增店铺券活动
export const createStoreCouponActive = params => ajax.post('/storeCoupon/createStoreCouponActive', params)

// 编辑店铺券活动
export const updateStoreCouponActive = params => ajax.post('/storeCoupon/updateStoreCouponActive', params)

// 获取店铺券活动表单限制条件
export const getCouponLimit = params => ajax.post('/storeCoupon/couponLimit', params)

// 获取店铺券活动表单限制条件
export const updateCouponState = params => ajax.post('/storeCoupon/updateActiveState', params)

// 根据油站和活动类型获取权益剩余次数
export const queryInterest = params => ajax.post('/storeCoupon/queryInterest', params)

// 根据油站和活动获取不可选日期
export const getDisabledDate = params => ajax.post('/storeCoupon/queryExistDate', params)

// 位置排序-查询当前登录油站信息
export const gasRankConfigQuery = params => ajax.post('gasRankConfig/queryById', params)

// 位置排序-添加位置排序
export const gasRankConfigAdd = params => ajax.post('/gasRankConfig/add', params)

// 位置排序-修改位置排序
export const gasRankConfigUpdate = params => ajax.post('/gasRankConfig/update', params)

// 位置排序-根据选择的时间获取各个时间段内辐射半径数
export const gasRankConfigDistance = params => ajax.post('/gasRankConfig/distance', params)

// 位置排序-查询排序列表
export const gasRankConfigQueryList = params => ajax.post('/gasRankConfig/query', params)

// 位置排序-排序设置下线
export const gasRankConfigQueryOffline = params => ajax.post('/gasRankConfig/offline', params)

// 位置排序-获取排序位置下拉列表项
export const getCustomLocationsList = params => ajax.post('/gasRankConfig/getCustomLocations', params)

// 位置排序-获取剩余天数
export const getSurplusDays = params => ajax.post('/gasRankConfig/getSurplusDays', params)


// 获取我的权益
export const getMyInterests = params => ajax.post('/interest/getMyInterests', params)

// 获取我的权益使用记录
export const getMyInterestsLogs = params => ajax.post('/interest/getMyInterestsLogs', params)

// 获取权益名称列表
export const getInterestNameList = params => ajax.post('/interest/getInterestNameList', params)
